package view.item
{
	import control.manager.BitmapManager;
	
	import data.GameConst;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	/**
	 * 自动寻路标识 
	 * @author leo
	 * 
	 */	
	public class PathTrack extends Sprite
	{
		private static var _I :PathTrack = null;
		public var mc :MovieClip;
		public function PathTrack(prv :PrivateClass)
		{
			super();
			
			var name :String = GameConst.PATH_TRACK;
			mc= BitmapManager.instance.getMCByName(name);
			if(!mc)
			{
				return;
			}
			
			this.addChild(mc);
		}
		
		public function show():void
		{
			mc.gotoAndPlay(1);
			this.visible = true;
		}
		
		
		public function hide():void
		{
			mc.gotoAndStop(1);
			this.visible = false;
		}
		
		public function resize():void
		{
			if(stage)
			{
				this.x = (stage.stageWidth)/2;
				this.y = (stage.stageHeight)/2;
			}
		}

		public static function get I():PathTrack
		{
			if(_I == null)
			{
				_I = new PathTrack(new PrivateClass());
			}
			return _I;
		}

	}
}

class PrivateClass{}